package function;

import book.BookList;

public class ExitSystem implements IFunction{
    public void act(BookList bookList){
        System.out.println("退出系统...");
        int currentSize = bookList.getBookNum();
        for (int i = 0; i < currentSize; i++) {
            bookList.setBook(null, i);
        }
        bookList.setBookNum(0);
        System.exit(0);
    }
}
